home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / speedt1a / frm.frm (.txt) < prev    next >
Visual Basic Form  |  1999-05-28  |  5KB  |  196 lines

  1. VERSION 5.00
  2. Begin VB.Form frm 
  3.    AutoRedraw      =   -1  'True
  4.    Caption         =   "Speed Test"
  5.    ClientHeight    =   4260
  6.    ClientLeft      =   4620
  7.    ClientTop       =   3480
  8.    ClientWidth     =   5070
  9.    Icon            =   "frm.frx":0000
  10.    LinkTopic       =   "frm"
  11.    ScaleHeight     =   284
  12.    ScaleMode       =   3  'Pixel
  13.    ScaleWidth      =   338
  14.    Begin VB.TextBox Text1 
  15.       Height          =   1905
  16.       Left            =   1230
  17.       MultiLine       =   -1  'True
  18.       ScrollBars      =   2  'Vertical
  19.       TabIndex        =   8
  20.       Text            =   "frm.frx":058A
  21.       Top             =   2370
  22.       Width           =   1950
  23.    End
  24.    Begin VB.CommandButton cmd 
  25.       Caption         =   "Test 5"
  26.       Height          =   300
  27.       Index           =   4
  28.       Left            =   0
  29.       TabIndex        =   7
  30.       Top             =   1215
  31.       Width           =   1215
  32.    End
  33.    Begin VB.CommandButton cmd 
  34.       Caption         =   "Test 4"
  35.       Height          =   300
  36.       Index           =   3
  37.       Left            =   0
  38.       TabIndex        =   6
  39.       Top             =   915
  40.       Width           =   1215
  41.    End
  42.    Begin VB.CommandButton cmd 
  43.       Caption         =   "Test 3"
  44.       Height          =   300
  45.       Index           =   2
  46.       Left            =   0
  47.       TabIndex        =   5
  48.       Top             =   615
  49.       Width           =   1215
  50.    End
  51.    Begin VB.PictureBox pic 
  52.       Appearance      =   0  'Flat
  53.       AutoRedraw      =   -1  'True
  54.       BackColor       =   &H00808080&
  55.       ForeColor       =   &H80000008&
  56.       Height          =   2040
  57.       Left            =   1230
  58.       ScaleHeight     =   134
  59.       ScaleMode       =   3  'Pixel
  60.       ScaleWidth      =   253
  61.       TabIndex        =   4
  62.       Top             =   315
  63.       Width           =   3825
  64.    End
  65.    Begin VB.CommandButton cmd 
  66.       Caption         =   "Test 2"
  67.       Height          =   300
  68.       Index           =   1
  69.       Left            =   0
  70.       TabIndex        =   2
  71.       Top             =   315
  72.       Width           =   1215
  73.    End
  74.    Begin VB.Timer Timer1 
  75.       Enabled         =   0   'False
  76.       Interval        =   10
  77.       Left            =   330
  78.       Top             =   4560
  79.    End
  80.    Begin VB.CommandButton cmd 
  81.       Caption         =   "Test 1"
  82.       Height          =   300
  83.       Index           =   0
  84.       Left            =   0
  85.       TabIndex        =   0
  86.       Top             =   15
  87.       Width           =   1215
  88.    End
  89.    Begin VB.Label lbl1 
  90.       Alignment       =   2  'Center
  91.       BackColor       =   &H00000040&
  92.       BorderStyle     =   1  'Fixed Single
  93.       Caption         =   "0"
  94.       ForeColor       =   &H00C0C0FF&
  95.       Height          =   300
  96.       Left            =   1230
  97.       TabIndex        =   3
  98.       ToolTipText     =   "Speed Time"
  99.       Top             =   15
  100.       Width           =   3825
  101.    End
  102.    Begin VB.Label lbl 
  103.       Alignment       =   2  'Center
  104.       BackColor       =   &H00000000&
  105.       BorderStyle     =   1  'Fixed Single
  106.       Caption         =   "0"
  107.       ForeColor       =   &H000000FF&
  108.       Height          =   300
  109.       Left            =   0
  110.       TabIndex        =   1
  111.       ToolTipText     =   "Clocks the Time to Run a Process"
  112.       Top             =   1515
  113.       Width           =   1215
  114.    End
  115.    Begin VB.Menu mnuFile 
  116.       Caption         =   "&File"
  117.       Begin VB.Menu mnuExit 
  118.          Caption         =   "E&xit"
  119.       End
  120.    End
  121.    Begin VB.Menu mnuHelp 
  122.       Caption         =   "&Help"
  123.       Begin VB.Menu mnuAbout 
  124.          Caption         =   "&About"
  125.       End
  126.    End
  127. Attribute VB_Name = "frm"
  128. Attribute VB_GlobalNameSpace = False
  129. Attribute VB_Creatable = False
  130. Attribute VB_PredeclaredId = True
  131. Attribute VB_Exposed = False
  132. Dim Countx As Single
  133. Private Sub cmd_Click(Index As Integer)
  134. Dim i As Integer, h As Integer
  135. On Error Resume Next
  136. Screen.MousePointer = vbHourglass
  137. Countx = 0
  138. pic.Cls
  139. lbl1.Caption = 0
  140. lbl.Caption = 0
  141. Timer1.Enabled = True
  142. Select Case Index
  143. Case 0 'Counting
  144. For i = 0 To 1000
  145.   lbl1.Caption = i
  146.   DoEvents
  147. Case 1 'Drawing
  148. For i = 0 To 255
  149.   pic.Line (i, 0)-(i, pic.ScaleHeight), RGB(0, i, i)
  150.   DoEvents
  151. Case 2 'Psets
  152. For i = 0 To 255
  153.   For h = 0 To pic.ScaleHeight
  154.     pic.PSet (i, h), RGB(0, i, h)
  155.   Next
  156.   DoEvents
  157. Case 3 'Print Text
  158. For i = 0 To pic.ScaleHeight
  159.   For h = 0 To pic.ScaleWidth
  160.     pic.CurrentX = h
  161.     pic.CurrentY = i
  162.     pic.ForeColor = RGB(h, 0, i)
  163.     pic.Print "Hello"
  164.   Next
  165.   DoEvents
  166. Case 4 'Print Slower
  167. For i = 0 To pic.ScaleHeight
  168.   For h = 0 To pic.ScaleWidth
  169.     pic.CurrentX = h
  170.     pic.CurrentY = i
  171.     pic.ForeColor = RGB(h, 0, i)
  172.     pic.Print "Hello"
  173.   Next
  174.   DoEvents
  175. For i = 0 To pic.ScaleHeight
  176.   For h = 0 To pic.ScaleWidth
  177.     pic.CurrentX = h
  178.     pic.CurrentY = i
  179.     pic.Circle (h, i), 5, Rnd * vbRed
  180.   Next
  181.   DoEvents
  182. End Select
  183. lbl.Caption = Countx * 0.1
  184. Timer1.Enabled = False
  185. Screen.MousePointer = vbDefault
  186. End Sub
  187. Private Sub mnuAbout_Click()
  188. MsgBox App.EXEName & " by Todd Spangler"
  189. End Sub
  190. Private Sub mnuExit_Click()
  191. End Sub
  192. Private Sub Timer1_Timer()
  193. Countx = Countx + 1
  194. lbl.Caption = Countx * 0.1
  195. End Sub
  196.